<template>
  <div ref="mainCon" class="container">
    <topTitle
      v-if="!hiddleToolBar"
      :titleText="titleText"
      :titleExplain="titleExplain"
    ></topTitle>
    <div class="mainCon">
      <el-row class="toolbar searchInputWidth" style="padding-bottom: 0">
        <el-form :inline="true" :model="filterField" ref="searchConditions">
          <el-col :lg="8" :xl="6">
            <el-form-item label="项目名称" class="row-padding-bottom">
              <el-input
                v-model="filterField.projectName"
                placeholder="请输入项目名称"
                clearable
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :lg="8" :xl="6">
            <el-form-item label="区域" class="row-padding-bottom">
              <el-cascader
                ref="manageArea"
                v-model="areaId"
                :options="areasOptions"
                @change="getAreaId"
                clearable
                filterable
                :props="{ checkStrictly: true }"
              ></el-cascader>
            </el-form-item>
          </el-col>
          <template v-if="advanced">
            <el-col :lg="8" :xl="6">
              <el-form-item label="行业" class="row-padding-bottom">
                <el-select
                  v-model="filterField.industryId"
                  filterable
                  placeholder="请选择"
                  clearable
                >
                  <el-option
                    v-for="item in industryOptions"
                    :key="item.code"
                    :label="item.name"
                    :value="item.code"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :lg="8" :xl="6">
              <el-form-item label="建设方" class="row-padding-bottom">
                <el-input
                  v-model="filterField.pcName"
                  placeholder="请输入建设方名称"
                  clearable
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :lg="8" :xl="6">
              <el-form-item label="施工方" class="row-padding-bottom">
                <el-input
                  v-model="filterField.pbName"
                  placeholder="请输入施工方名称"
                  clearable
                ></el-input>
              </el-form-item>
            </el-col>
            <el-col :lg="8" :xl="6">
              <el-form-item label="状态" class="row-padding-bottom">
                <el-select
                  v-model="filterField.status"
                  filterable
                  placeholder="请选择"
                  clearable
                >
                  <el-option
                    v-for="item in statusOptions"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :lg="8" :xl="6">
              <el-form-item label="投资类型" class="row-padding-bottom">
                <el-select
                  v-model="filterField.investment"
                  filterable
                  placeholder="请选择"
                  clearable
                >
                  <el-option
                    v-for="item in investmentOptions"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :lg="8" :xl="6">
              <el-form-item label="开设专户" class="row-padding-bottom">
                <el-select
                  v-model="filterField.isSa"
                  placeholder="请选择"
                  clearable
                >
                  <el-option label="是" value="1"></el-option>
                  <el-option label="否" value="0"></el-option>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :lg="8" :xl="6">
              <el-form-item label="项目来源" class="row-padding-bottom">
                <el-select
                  v-model="filterField.sourceType"
                  placeholder="请选择"
                  clearable
                >
                  <el-option
                    v-for="item in sourceTypeOptions"
                    :key="item.id"
                    :label="item.name"
                    :value="item.id"
                  ></el-option>
                </el-select>
              </el-form-item>
            </el-col>
          </template>
          <el-form-item>
            <a
              @click="toggleAdvanced"
              style="margin-left: 40px; color: #409eff; cursor: pointer"
              class="btnColor"
            >
              {{ advanced ? '收起' : '展开' }}
              <i
                :class="advanced ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
              ></i>
            </a>
            <el-button
              type="primary"
              icon="icon iconfont iconchazhao1"
              @click="searchList"
              class="searchBtn"
            >
              <span>搜索</span>
            </el-button>
            <template v-if="isCzUser()">
              <el-popover placement="bottom" width="300" trigger="click">
                <template>
                  <el-checkbox
                    :indeterminate="isIndeterminate"
                    v-model="checkAll"
                    @change="handleCheckAllChange"
                    style="margin-bottom: 12px"
                    >全选</el-checkbox
                  >
                  <el-checkbox-group
                    v-model="checkedCities"
                    @change="handleCheckedCitiesChange"
                  >
                    <el-checkbox
                      v-for="item in cities"
                      :label="item.code"
                      :key="item.code"
                      >{{ item.name }}</el-checkbox
                    >
                  </el-checkbox-group>
                  <div style="text-align: right; margin-top: 10px">
                    <el-button type="primary" size="mini" @click="exportExcel"
                      >确定</el-button
                    >
                  </div>
                </template>
                <el-button
                  class="commonBut saveBtn funComBut"
                  icon="icon iconfont icondaochu"
                  slot="reference"
                  style="margin-left: 10px"
                  ><span class="opetareText">导出预警明细</span></el-button
                >
              </el-popover>
            </template>
            <!-- admin账号及地区管理员才有修改 -->
            <!-- 由于admin 账号和监察都是monitor 无法区分，暂只做地区管理员 -->
            <el-button
              v-if="isShowUpdate && userType == 'AREAMANAGE'"
              class="commonBut saveBtn funComBut outEmployee"
              v-sdc
              @click="goManyUpdate"
            >
              <span class="opetareText">批量修改来源</span>
            </el-button>
          </el-form-item>
        </el-form>
      </el-row>
      <div class="spacing"></div>
      <div
        ref="tableBox"
        :class="hiddleToolBar ? 'tableBoxCur tableBox' : 'tableBoxCur'"
      >
        <el-table
          ref="tableBox1"
          :max-height="tableHeight"
          @selection-change="handleSelectionChange"
          @sort-change="sortChange"
          :data="tableList"
          v-loading="loading"
          :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
          highlight-current-row
          stripe
          style="border: 1px solid #dfe6ec"
        >
          <el-table-column
            v-if="isShowUpdate && userType == 'AREAMANAGE'"
            type="selection"
            width="55"
          ></el-table-column>
          <el-table-column label="项目名称" width="230px">
            <template slot-scope="scope">
              <copyText
                :tableIndex="scope.$index"
                :copyTextName="scope.row.projectName"
                :columnName="'projectName'"
              ></copyText>
            </template>
          </el-table-column>
          <el-table-column
            prop="areaName"
            label="区域"
            align="center"
            min-width="150"
            :formatter="formatTd"
          ></el-table-column>
          <el-table-column
            prop="industryName"
            label="行业"
            align="center"
            :formatter="formatTd"
          ></el-table-column>
          <!-- <el-table-column prop="pcName" label="建设方" align="center" :formatter=formatTd width="200px"></el-table-column>
                <el-table-column prop="pbName" label="施工方" align="center" :formatter=formatTd width="200px"></el-table-column> -->
          <el-table-column label="建设方" width="230">
            <template slot-scope="scope">
              <copyText
                :tableIndex="scope.$index"
                :copyTextName="scope.row.pcName"
                :columnName="'pcName'"
              ></copyText>
            </template>
          </el-table-column>
          <el-table-column label="施工方" width="230">
            <template slot-scope="scope">
              <copyText
                :tableIndex="scope.$index"
                :copyTextName="scope.row.pbName"
                :columnName="'pbName'"
              ></copyText>
            </template>
          </el-table-column>
          <el-table-column
            prop="statusDesc"
            label="状态"
            align="center"
            :formatter="formatTd"
          ></el-table-column>
          <el-table-column
            prop="isSaDesc"
            label="是否开设专户"
            align="center"
            :formatter="formatTd"
            width="120px"
          ></el-table-column>
          <el-table-column
            prop="investmentDesc"
            label="投资类型"
            align="center"
            :formatter="formatTd"
            width="120px"
          ></el-table-column>
          <el-table-column
            prop="peopleTotal"
            label="总人数"
            sortable="custom"
            width="120px"
            align="center"
            :formatter="formatTd"
          ></el-table-column>
          <el-table-column
            prop="attPresentTotal"
            label="在场人数"
            sortable="custom"
            align="center"
            :render-header="renderHeader"
            width="140px"
          ></el-table-column>
          <el-table-column
            prop="attTotal"
            label="总考勤人次"
            sortable="custom"
            align="center"
            width="140px"
          ></el-table-column>
          <el-table-column
            prop="attTodayTotal"
            label="当日考勤人次"
            sortable="custom"
            align="center"
            width="160px"
            :render-header="renderHeader"
          >
            <template slot-scope="scope">
              <el-link
                type="primary"
                style="margin-right: 0 !important"
                @click="todayAtt(scope.$index, scope.row)"
                v-if="scope.row.attTodayTotal"
                >{{ scope.row.attTodayTotal }}</el-link
              >
              <span v-else>0</span>
            </template>
          </el-table-column>
          <!-- 项目列表添加建档时间、开工时间 2020/10/19 恩施-->
          <el-table-column
            prop="archiveDate"
            label="建档时间"
            sortable="custom"
            align="center"
            :formatter="formatTd"
            width="150px"
          ></el-table-column>
          <el-table-column
            prop="projectStartDate"
            label="开工时间"
            sortable="custom"
            align="center"
            :formatter="formatTd"
            width="150px"
          ></el-table-column>
          <el-table-column
            prop="sourceTypeText"
            label="项目来源"
            align="center"
            :formatter="formatTd"
            min-width="110px"
          ></el-table-column>
          <el-table-column
            v-if="!isCzUser()"
            prop="alertTotal"
            label="预警"
            sortable="custom"
            align="center"
            min-width="110px"
            :formatter="formatTd"
          ></el-table-column>
          <el-table-column
            v-if="isCzUser()"
            prop="handle"
            label="未处理/处理中/已处理预警"
            align="center"
            :formatter="formatTd"
            width="220px"
          >
            <template slot-scope="scope">
              <el-link type="primary" @click="linkToNotice(scope.row, 1)">{{
                scope.row.handle || '0'
              }}</el-link
              >/<el-link type="primary" @click="linkToNotice(scope.row, 2)">{{
                scope.row.handling || '0'
              }}</el-link
              >/<el-link type="primary" @click="linkToNotice(scope.row, 3)">{{
                scope.row.handled || '0'
              }}</el-link>
            </template>
          </el-table-column>
          <el-table-column
            v-if="isCzUser()"
            prop="monthHandle"
            label="本月处理预警"
            sortable="custom"
            align="center"
            :formatter="formatTd"
            width="140px"
          >
            <template slot-scope="scope">
              <el-link type="primary" @click="linkToNoticeMonth(scope.row)">{{
                scope.row.monthHandle || '0'
              }}</el-link>
            </template>
          </el-table-column>

          <el-table-column
            label="操作"
            align="left"
            fixed="right"
            width="110px"
          >
            <template slot-scope="scope">
              <el-link
                v-if="isShowDetail"
                type="primary"
                @click="toDetail(scope.$index, scope.row)"
                >查看详情</el-link
              >
              <span v-else>--</span>
            </template>
          </el-table-column>
          <!-- 表格数据为空时，页面显示 -->
          <div slot="empty" v-show="isShow">
            <emptyTable emptyText="暂无相关信息"></emptyTable>
          </div>
        </el-table>
        <Pagination
          ref="pagination"
          @getpageNo="getpageNo"
          @getpageSize="getpageSize"
          @getList="getTableList"
          :filterField="filterField"
          :requestUrl="requestUrl"
        ></Pagination>
      </div>
    </div>
    <!-- 修改来源 -->
    <el-dialog
      title="批量修改项目来源"
      :visible.sync="manyUpdateDia"
      @close="closeDialog('formData')"
      :close-on-click-modal="false"
      :modal-append-to-body="false"
      width="550px"
    >
      <el-form :model="formData" :rules="formRules" ref="formData">
        <el-form-item label="" prop="sourceType">
          <el-radio-group v-model="formData.sourceType">
            <el-radio
              v-for="item in sourceTypeOptions"
              :key="item.id"
              :label="item.id"
              >{{ item.name }}</el-radio
            >
          </el-radio-group>
        </el-form-item>
        <el-row>请仔细确认核实所勾选的项目！</el-row>
      </el-form>
      <div div slot="footer" class="dialog-footer">
        <el-button @click.native="closeDialog('formData')" class="cancel"
          >取消</el-button
        >
        <el-button
          type="primary"
          @click.native="saveEli"
          v-sdc
          :loading="isSaveLoading"
          class="save"
          >保存</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>

<script>
import { mapActions, mapState } from 'vuex'
import common from '../../kits/common'
import scrollTable from '../../mixin/scrollTable'
export default {
  name: 'dutyProjectList',
  mixins: [scrollTable],
  data() {
    return {
      titleText: '责任项目',
      titleExplain:
        '展示网格管理员的负责的项目清单，查看详情可全面掌握项目落实情况',
      advanced: false,
      //表格数据
      tableList: [],
      requestUrl: 'api-p/gridlink/expand/dutylist',
      areaId: '', //区域
      //搜索条件
      filterField: {
        pcName: '', //建设方
        pbName: '', //施工方
        sourceType: '', //项目来源
        projectName: '', //项目名称
        areaId: '', //区域
        status: 'STARTED', //开工状态  ；默认只显示已开工状态的项目2020/10/19 恩施
        industryId: '', //行业
        investment: '', //投资类型
        isSa: '', //是否开设专户
      },
      pageSize: 20,
      pageNo: 1,
      // pageNos: '1',
      // pageSize:'20',
      isShow: false, //列表加载
      isShowDetail: '',
      isShowUpdate: '',
      loading: true,
      sourceTypeOptions: [
        {
          name: '企业申报',
          id: '01',
        },
        {
          name: '监察建档',
          id: '03',
        },
        {
          name: '第三方接口',
          id: '05',
        },
      ], //项目来源
      multipleSelection: [], //当前选中项
      projectIdArr: [],
      manyUpdateDia: false,
      formData: {
        sourceType: '',
      },
      formRules: {
        sourceType: [
          {
            required: true,
            message: '请选择修改来源',
            trigger: ['blur', 'change'],
          },
        ],
      },
      isSaveLoading: false,
      userType: '',
      checkedCities: ['01', '05', '10'],
      checkAll: true,
      isIndeterminate: false,
      cities: [
        { code: '01', name: '未处理' },
        { code: '05', name: '处理中' },
        { code: '10', name: '已处理' },
      ],
    }
  },
  computed: {
    ...mapState([
      'investmentOptions',
      'statusOptions',
      'areasOptions',
      'industryOptions',
    ]),
  },
  created() {
    this.userType = this.$store.state.userType
    this.getInvestmenttype({})
    this.getStatus({})
    this.getAreas({ areaId: this.$store.state.areaInfoArr.areaId })
    this.getIndustry({})
    this.getSourceType()
    const {
      projectName,
      areaId,
      status,
      industryId,
      investment,
      isSa,
      pageNo,
      pageSize,
    } = this.$route.query
    let filterField = window.localStorage.getItem('filterField')
    this.filterField = {
      projectName: projectName ? projectName : '', //项目名称
      areaId: areaId ? areaId : '', //区域
      status: filterField ? status : 'STARTED', //开工状态  ；默认只显示已开工状态的项目2020/10/19 恩施
      industryId: industryId ? industryId : '', //行业
      investment: investment ? investment : '', //投资类型
      isSa: isSa ? isSa : '', //是否开设专户
      pcName: '', //建设方
      pbName: '', //施工方
      sourceType: '',
    }

    // this.pageNos = pageNo||1
    // this.$store.commit('SET_INFO',['pageNo',pageNo||1])
    // this.pageSize = pageSize
    if (this.$route.query.sign == 'chuzhouBigScreen') {
      this.filterField.status = ''
    }
    if (areaId) {
      this.$nextTick(function () {
        this.$refs.pagination.getTableListData()
      })
      this.areaId = this.$route.query.areaId
    } else {
      this.getProject()
    }

    this.isShowDetail =
      this.$store.state.buttonLimitsArr.indexOf('accountList:detail') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('esSpecialAccountList:detail') >
        -1 ||
      this.$store.state.buttonLimitsArr.indexOf('mProjectList:detail') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('insurance:detail') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('mInsurance:detail') > -1
    this.isShowUpdate =
      this.$store.state.buttonLimitsArr.indexOf('accountList:update') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('esSpecialAccountList:update') >
        -1 ||
      this.$store.state.buttonLimitsArr.indexOf('mProjectList:update') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('insurance:update') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('mInsurance:update') > -1
  },

  watch: {
    $route(to, from) {
      if (from.path === '/home/monitorPage/constructMonitorHome') {
        this.getProject()
      }
      // 10/19恩施需求，传递参数到详情页

      if (to.name == 'projectDetail') {
        window.localStorage.setItem(
          'filterField',
          JSON.stringify(this.filterField)
        )
        window.localStorage.setItem('pageNo', this.$refs.pagination.curPageNo)
        window.localStorage.setItem(
          'pageSize',
          this.$refs.pagination.pageSizeNumber
        )
      }
      // 10/19恩施需求，传递参数到详情页

      if (to.name == 'projectDetail') {
        window.localStorage.setItem(
          'filterField',
          JSON.stringify(this.filterField)
        )
        window.localStorage.setItem('pageNo', this.$refs.pagination.curPageNo)
        window.localStorage.setItem(
          'pageSize',
          this.$refs.pagination.pageSizeNumber
        )
      }
    },
  },
  mounted() {},
  activated() {
    this.$nextTick(function () {
      this.$refs.pagination.getTableListData(this.pageNo, this.pageSize)
    })
  },
  methods: {
    toggleAdvanced() {
      this.advanced = !this.advanced
    },
    getpageSize(val) {
      this.pageSize = val
    },
    getpageNo(val) {
      this.pageNo = val
    },
    ...mapActions([
      'getInvestmenttype',
      'getStatus',
      'getAreas',
      'getIndustry',
    ]),
    getProject() {
      if (this.$route.params && this.$route.params.projectName) {
        this.filterField.projectName = this.$route.params.projectName
        this.$nextTick(function () {
          this.$refs.pagination.getTableListData()
        })
      } else {
        this.$nextTick(function () {
          this.$refs.pagination.getTableListData()
        })
      }
    },
    //获取选中的区域最后一级id
    getAreaId() {
      var areaId = this.areaId[this.areaId.length - 1]
      this.filterField.areaId = areaId
    },
    getTableList(data) {
      this.tableList = data
      this.loading = false
      if (this.tableList.length < 1) {
        this.isShow = true
      }
    },
    // 搜索
    searchList() {
      this.pageSize = 20
      this.pageNo = 1
      this.$refs.pagination.getTableListData()
    },
    //跳转详情
    toDetail(index, row) {
      this.$router.push({
        path: '/home/monitorProjectManagement/projectDetail',
        name: 'projectDetail',
        query: {
          projectId: row.projectId,
        },
      })
      this.$store.commit('CHANGE_SLIDER_NAME', {
        oldUrl: '/home/project/projectList',
        newUrl: this.$router.currentRoute.fullPath,
      })
    },
    renderHeader(h, { column }) {
      if (column.label == '在场人数') {
        return h('div', { style: 'display:inline-block' }, [
          h('span', column.label),
          h(
            'el-tooltip',
            {
              props: {
                effect: 'dark',
                content: '统计三天内已打卡进门，但未打卡出门人员数量',
                placement: 'top',
              },
            },
            [
              h('i', {
                class: 'icon iconfont iconhuabanfuben',
                style: 'margin-left:5px;',
              }),
            ],
            {
              content: '统计三天内已打卡进门，但未打卡出门人员数量',
            }
          ),
        ])
      } else {
        return h('div', { style: 'display:inline-block' }, [
          h('span', column.label),
          h(
            'el-tooltip',
            {
              props: {
                effect: 'dark',
                content: '数据每小时更新一次，可能与考勤按日统计中不同',
                placement: 'top',
              },
            },
            [
              h('i', {
                class: 'icon iconfont iconhuabanfuben',
                style: 'margin-left:5px;',
              }),
            ],
            {
              content: '数据每小时更新一次，可能与考勤按日统计中不同',
            }
          ),
        ])
      }
    },
    // 当日考勤人次跳转工人考勤-按日统计
    todayAtt(index, row) {
      this.$router.push({
        path: '/home/monitorProjectManagement/projectDetail',
        name: 'projectDetail',
        query: {
          projectId: row.projectId,
          activeName: 'third',
        },
      })
      this.$store.commit('CHANGE_SLIDER_NAME', {
        oldUrl: '/home/project/projectList',
        newUrl: this.$router.currentRoute.fullPath,
      })
    },
    getSourceType() {
      this.axios({
        method: 'post',
        url: 'api-p/project/expand/sourceType',
      })
        .then((response) => {
          if (!response.data.hasError) {
            this.sourceTypeOptions = response.data.result
          }
        })
        .catch({})
    },
    //批量修改来源
    goManyUpdate() {
      //未选中任何项目时
      if (this.multipleSelection.length == 0) {
        this.$message({
          message: '请先选择项目后操作',
          type: 'warning',
          duration: 2000,
        })
        return
      } else {
        this.manyUpdateDia = true
      }
    },
    handleSelectionChange(val) {
      this.multipleSelection = val
    },
    closeDialog(ele) {
      this.$refs['formData'].resetFields()
      this.manyUpdateDia = false
    },
    saveEli() {
      this.$refs['formData'].validate((valid) => {
        if (valid) {
          this.isSaveLoading = true
          this.toUpdate()
        } else {
          return false
        }
      })
    },
    toUpdate() {
      var projectIdArr = []
      this.multipleSelection.forEach(function (item) {
        if (item.projectId) {
          projectIdArr.push(item.projectId)
        }
      })
      this.axios({
        method: 'post',
        url: 'api-p/project/expand/editSourceType',
        data: {
          projectIds: JSON.stringify(projectIdArr),
          sourceType: this.formData.sourceType,
        },
      })
        .then((response) => {
          this.isSaveLoading = false
          if (!response.data.hasError) {
            this.$message({
              type: 'success',
              message: response.data.msg,
            })
            this.manyUpdateDia = false
            this.$nextTick(function () {
              this.$refs.pagination.getTableListData()
            })
          } else {
            this.$message({
              type: 'error',
              message: response.data.errorMsg,
            })
            this.isSaveLoading = false
          }
        })
        .catch((error) => {
          this.$message.error('保存失败')
          this.isSaveLoading = false
        })
    },
    //跳转至预警明细页
    linkToNotice(item, index) {
      this.$router.push({
        path: '/home/project/constructAlertProjectList',
        name: 'constructAlertProjectList',
        query: {
          projectName: item.projectName,
          status: index == 1 ? '01' : index == 2 ? '05' : '10',
        },
      })
      this.$store.commit('CHANGE_SLIDER_NAME', {
        oldUrl: '/home/project/constructAlertProjectList',
        newUrl: this.$router.currentRoute.fullPath,
      })
    },
    linkToNoticeMonth(item) {
      var year = new Date().getFullYear()
      var month = new Date().getMonth() + 1
      var day = new Date(year, month, 0)

      let starResult = year + '-' + month + '-01'
      let endResult = year + '-' + month + '-' + day.getDate()
      this.$router.push({
        path: '/home/project/constructAlertProjectList',
        name: 'constructAlertProjectList',
        query: {
          projectName: item.projectName,
          status: '10',
          removeTimeStart: starResult,
          removeTimeEnd: endResult,
        },
      })
      this.$store.commit('CHANGE_SLIDER_NAME', {
        oldUrl: '/home/project/constructAlertProjectList',
        newUrl: this.$router.currentRoute.fullPath,
      })
    },
    // 导出
    handleCheckAllChange(val) {
      this.checkedCities = val ? ['01', '05', '10'] : []
      this.isIndeterminate = false
    },
    handleCheckedCitiesChange(value) {
      let checkedCount = value.length
      this.checkAll = checkedCount === this.cities.length
      this.isIndeterminate =
        checkedCount > 0 && checkedCount < this.cities.length
    },
    exportExcel() {
      var that = this
      if (this.tableList.length > 0) {
        window.location.href =
          common.commonApi +
          'api-s/report/export_JC_WG_DUTY_CS_ALERT?projectName=' +
          that.filterField.projectName +
          '&areaId=' +
          that.filterField.areaId +
          '&industryId=' +
          that.filterField.industryId +
          '&investment=' +
          that.filterField.investment +
          '&pcName=' +
          that.filterField.pcName +
          '&pbName=' +
          that.filterField.pbName +
          '&status=' +
          that.filterField.status +
          '&isSa=' +
          that.filterField.isSa +
          '&sort=' +
          that.filterField.sort +
          '&sortField=' +
          that.filterField.sortField +
          '&sourceType=' +
          that.filterField.sourceType +
          '&gridAlertStatusJson=' +
          that.checkedCities +
          '&access_token=' +
          localStorage.getItem('access_token')
      } else {
        this.$message({
          type: 'warning',
          message: '无数据导出',
        })
      }
    },
  },
}
</script>

<style scoped lang="less">
.topTitle {
  height: 67px;
  background-color: #e4ebf1;
  padding-left: 24px;
  font: bold 18px/67px Microsoft YaHei;
}
.mainCon {
  top: 210px;
}
@media only screen and (max-width: 1366px) {
  /deep/.searchInputWidth .el-form--inline .el-form-item__label {
    width: 80px;
  }
}
@import '../../../static/css/filterArea.less';
</style>
